import { SHOWLOADING,HIDELOADING,TITLE,TOPSTATUS} from './type.js'


const state = {
	showLoading:false,
	searchVal:'',
  title:'首页',
  topstatus:true,
}

const mutations = {
	[SHOWLOADING](state){
		state.showLoading = true;
	},
	[HIDELOADING](state){
		state.showLoading = false;
	},
  [TOPSTATUS](state,val){
    state.topstatus = val;
  }

}

const getters = {
	loading(state){
		return state.showLoading
	},
  topstatus(state){
    return state.topstatus
  }
}

export default {
	state,mutations,getters
}
